<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>保存数据</title>
</head>
<body><%
String method=request.getMethod();
request.setCharacterEncoding("utf-8");//设置POST请求体数据的解码格式，
String name=request.getParameter("name");
String age=request.getParameter("age");
%>
<h1>你提交的数据是</h1>
<p>表单提交的方法：<%= method %></p>
<p>姓名:<%=name %></p>
<p>年龄：<%=age %></p>
</body>
</html>